<div class="plan-detail">
  <nz-spin [nzTip]="'正在查询请等待...'" [nzSize]="'large'" [nzSpinning]="isSpinning">
    <nz-collapseset>
        <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
            <form nz-form [nzLayout]="'inline'">
                <div style="margin-bottom: 12px" nz-row>

                  <div nz-form-label nz-col [nzSpan]="2">
                    <label>实施对象</label>
                  </div>
                  <div nz-form-control nz-col [nzSpan]="4">
                    <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="selectValue"
                               [nzShowSearch]="true" name="checkState">
                      <nz-option *ngFor="let plan of planList" [nzLabel]="plan" [nzValue]="plan"></nz-option>
                    </nz-select>
                  </div>


                  <div  nz-form-label nz-col [nzSpan]="1">
                    <label>时间</label>
                  </div>
                  <div nz-form-item nz-col [nzSpan]="8">
                    <nz-datepicker style="width: 40%;" name="1" (ngModelChange)="startDate=$event;_startValueChange()" [ngModel]="startDate"
                                   [nzDisabledDate]="_disabledStartDate" [nzShowTime]="true" [nzFormat]="'YYYY-MM-DD HH:mm:ss'"
                                   [nzPlaceHolder]="'开始时间'"></nz-datepicker>
                    至
                    <nz-datepicker style="width: 40%;" name="2" (ngModelChange)="endDate=$event;_endValueChange()" [ngModel]="endDate"
                                   [nzDisabledDate]="_disabledEndDate" [nzShowTime]="_endTime" [nzFormat]="'YYYY-MM-DD HH:mm:ss'"
                                   [nzPlaceHolder]="'结束时间'"></nz-datepicker>
                  </div>


                    <button nz-button nz-col [nzSpan]="2" [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
                </div>
            </form>
        </nz-collapse>
    </nz-collapseset>
    <ul nz-menu [nzMode]="'horizontal'">
        <li nz-menu-item (click)="planExcel()">
            <i class="anticon anticon-copy"   ></i>计划汇总导出
        </li>
    </ul>
    <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false"
        (nzDataChange)="displayDataChange($event)">
        <thead nz-thead>
            <tr>
                <th nz-th [nzCheckbox]="true">
                    <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
                    </label>
                </th>
                <th nz-th>
                    <span>计划名称</span>
                </th>
                <th nz-th>
                    <span>检查人</span>
                </th>
                <th nz-th>
                    <span>被检查人</span>
                </th>
                <th nz-th>
                    <span>设备Id</span>
                </th>
                <th nz-th>
                  <span>检查结论</span>
                </th>
                <th nz-th>
                  <span>检查时间</span>
                </th>
                <th nz-th>
                  <span>检查人签名</span>
                </th>
                <th nz-th>
                    <span>导出</span>
                </th>
                <th nz-th>
                  <span>详情</span>
                </th>
            </tr>
        </thead>
        <tbody nz-tbody>
            <tr nz-tbody-tr *ngFor="let data of list">
                <td nz-td [nzCheckbox]="true">
                    <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
                    </label>
                </td>
                <td nz-td>{{data.planName}}</td>
                <td nz-td >{{data.checkMan}}</td>
                <td nz-td >{{data.implementObject}}</td>
                <td nz-td>{{data.elevatorId}}</td>
                <td nz-td>{{data.resultEvaluate}}</td>
                <td nz-td>{{data.createDate}}</td>
                <td nz-td>
                  <img src="{{data.signPhoto}}" width="120px" height="40px" />
                </td>
                <td nz-td><button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="exportExcelObj(data)" >导出</button></td>
                <td nz-td><button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="details(title, content, footer,data)" >详情</button></td>
            </tr>
        </tbody>
    </nz-table>

    <nz-pagination [nzPageIndex]="objectPlan.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
        (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
        (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="objectPlan.pageSize"></nz-pagination>

  </nz-spin>


  <!--添加界面-->
  <ng-template #title>
    <span>{{modelTitle}}</span>
  </ng-template>
  <ng-template #content>
    <spot-object-detailsInterface *ngIf="modal==0" [inValue]="detailsData"></spot-object-detailsInterface>
  </ng-template>
  <ng-template #footer>
    <div>
    </div>
  </ng-template>



</div>
